#encoding:UTF-8
import re
import mylib
import pythonlibSB

def get_hot_link():
    try:
        results = []
        
        content = mylib.get_content('http://genk.vn/')
        hot_10_link = []
        hot_10_content = pythonlibSB.s_string(content,'class="home-highlight-5"','div')
        for i in re.finditer('(<a)(.*?)(class=")(.*?)(href=")(.*?)(")',hot_10_content):
            url10 = i.group(6) if i.group(6).find('http://')!=-1 else ('http://genk.vn'+i.group(6))
            hot_10_link.append(url10)
        
        results.append(hot_10_link)
        
        hot_9_link = []
        results.append(hot_9_link)
        
        hot_8_link = []
        
        results.append(hot_8_link)
        
        results.append([])           
        
        return results
    except:
        return []
    
    
if __name__ == "__main__":
    results = get_hot_link()
    print results